package com.cdu.guoxinan.www.smartcom.service.impl;

import com.cdu.guoxinan.www.smartcom.domian.pojo.MedicalServiceConfig;
import com.cdu.guoxinan.www.smartcom.mapper.MedicalServiceConfigMapper;
import com.cdu.guoxinan.www.smartcom.service.MedicalServiceConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class MedicalServiceConfigServiceImpl implements MedicalServiceConfigService {
    @Autowired
    private MedicalServiceConfigMapper medicalServiceConfigMapper;

    @Override
    public List<MedicalServiceConfig> findAll() {
        return medicalServiceConfigMapper.findAll();
    }

    @Override
    public MedicalServiceConfig findById(Integer serviceType) {
        return medicalServiceConfigMapper.findById(serviceType);
    }

    @Override
    public boolean addServiceConfig(MedicalServiceConfig config) {
        return medicalServiceConfigMapper.insert(config) > 0;
    }
    @Override
    public boolean updateServiceConfig(MedicalServiceConfig config) {
        return medicalServiceConfigMapper.update(config) > 0;
    }
    @Override
    public boolean deleteServiceConfig(Integer serviceType) {
        return medicalServiceConfigMapper.delete(serviceType) > 0;
    }
} 